home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / ct_ocx / ct_misc.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-31  |  10.6 KB  |  357 lines

  1. VERSION 4.00
  2. Begin VB.Form w_misc_demo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Miscellaneous Controls"
  6.    ClientHeight    =   5940
  7.    ClientLeft      =   1140
  8.    ClientTop       =   1515
  9.    ClientWidth     =   8280
  10.    Height          =   6345
  11.    Left            =   1080
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   5940
  17.    ScaleWidth      =   8280
  18.    Top             =   1170
  19.    Width           =   8400
  20.    Begin VB.TextBox Text2 
  21.       Height          =   315
  22.       Left            =   4620
  23.       TabIndex        =   20
  24.       Text            =   "Stop Sign"
  25.       Top             =   3720
  26.       Width           =   1575
  27.    End
  28.    Begin VB.TextBox Text1 
  29.       Height          =   375
  30.       Left            =   6600
  31.       TabIndex        =   18
  32.       Text            =   "0"
  33.       Top             =   3300
  34.       Width           =   615
  35.    End
  36.    Begin VB.HScrollBar HScroll1 
  37.       Height          =   255
  38.       Left            =   180
  39.       Max             =   24
  40.       Min             =   1
  41.       TabIndex        =   13
  42.       Top             =   4560
  43.       Value           =   1
  44.       Width           =   3495
  45.    End
  46.    Begin VB.CommandButton Command1 
  47.       Caption         =   "E&xit"
  48.       Height          =   375
  49.       Left            =   6840
  50.       TabIndex        =   4
  51.       Top             =   5400
  52.       Width           =   1095
  53.    End
  54.    Begin VB.Label Label9 
  55.       Alignment       =   2  'Center
  56.       Caption         =   $"ct_misc.frx":0000
  57.       ForeColor       =   &H00800000&
  58.       Height          =   855
  59.       Left            =   4560
  60.       TabIndex        =   19
  61.       Top             =   4260
  62.       Width           =   3435
  63.    End
  64.    Begin VB.Label Label8 
  65.       Alignment       =   2  'Center
  66.       Caption         =   $"ct_misc.frx":00BA
  67.       ForeColor       =   &H00800000&
  68.       Height          =   1455
  69.       Left            =   4440
  70.       TabIndex        =   17
  71.       Top             =   1200
  72.       Width           =   3675
  73.    End
  74.    Begin TextLib.ctText ctText1 
  75.       Height          =   315
  76.       Left            =   5580
  77.       TabIndex        =   16
  78.       Top             =   660
  79.       Width           =   1335
  80.       _version        =   65536
  81.       _extentx        =   2355
  82.       _extenty        =   556
  83.       _stockprops     =   70
  84.       backcolor       =   16777215
  85.       textxoffset     =   3
  86.       picture         =   "ct_misc.frx":0202
  87.    End
  88.    Begin DataLib.ctData ctData2 
  89.       Height          =   315
  90.       Left            =   6900
  91.       TabIndex        =   15
  92.       Top             =   660
  93.       Width           =   975
  94.       _version        =   65536
  95.       _extentx        =   1720
  96.       _extenty        =   556
  97.       _stockprops     =   64
  98.       pictureleft     =   "ct_misc.frx":021E
  99.       picturecenter   =   "ct_misc.frx":023A
  100.       pictureright    =   "ct_misc.frx":0256
  101.       style           =   1
  102.    End
  103.    Begin VB.Label Label7 
  104.       Alignment       =   2  'Center
  105.       Caption         =   $"ct_misc.frx":0272
  106.       ForeColor       =   &H00800000&
  107.       Height          =   855
  108.       Left            =   180
  109.       TabIndex        =   14
  110.       Top             =   4920
  111.       Width           =   3495
  112.    End
  113.    Begin VB.Image Image1 
  114.       Height          =   1080
  115.       Left            =   180
  116.       Picture         =   "ct_misc.frx":0332
  117.       Top             =   3300
  118.       Width           =   1800
  119.    End
  120.    Begin VB.Label Label6 
  121.       Caption         =   "ctClip : Picture Clip Control"
  122.       BeginProperty Font 
  123.          name            =   "MS Sans Serif"
  124.          charset         =   0
  125.          weight          =   700
  126.          size            =   8.25
  127.          underline       =   0   'False
  128.          italic          =   0   'False
  129.          strikethrough   =   0   'False
  130.       EndProperty
  131.       Height          =   255
  132.       Left            =   180
  133.       TabIndex        =   12
  134.       Top             =   2880
  135.       Width           =   2355
  136.    End
  137.    Begin ClipLibCtl.ctClip ctClip1 
  138.       Height          =   270
  139.       Left            =   2820
  140.       TabIndex        =   11
  141.       Top             =   3660
  142.       Width           =   300
  143.       _version        =   65536
  144.       _extentx        =   529
  145.       _extenty        =   476
  146.       _stockprops     =   65
  147.       piccols         =   6
  148.       picrows         =   4
  149.       picture         =   "ct_misc.frx":1494
  150.    End
  151.    Begin VB.Label Label5 
  152.       Alignment       =   2  'Center
  153.       Caption         =   $"ct_misc.frx":7A26
  154.       ForeColor       =   &H00800000&
  155.       Height          =   1035
  156.       Left            =   120
  157.       TabIndex        =   10
  158.       Top             =   1560
  159.       Width           =   3315
  160.    End
  161.    Begin VB.Label Label4 
  162.       Caption         =   "ctDATA : Data Navigation Butons"
  163.       BeginProperty Font 
  164.          name            =   "MS Sans Serif"
  165.          charset         =   0
  166.          weight          =   700
  167.          size            =   8.25
  168.          underline       =   0   'False
  169.          italic          =   0   'False
  170.          strikethrough   =   0   'False
  171.       EndProperty
  172.       Height          =   375
  173.       Left            =   4620
  174.       TabIndex        =   9
  175.       Top             =   210
  176.       Width           =   3255
  177.    End
  178.    Begin VB.Label Label2 
  179.       Caption         =   "ctSPIN : Spin Button Control"
  180.       BeginProperty Font 
  181.          name            =   "MS Sans Serif"
  182.          charset         =   0
  183.          weight          =   700
  184.          size            =   8.25
  185.          underline       =   0   'False
  186.          italic          =   0   'False
  187.          strikethrough   =   0   'False
  188.       EndProperty
  189.       Height          =   285
  190.       Left            =   4620
  191.       TabIndex        =   8
  192.       Top             =   2880
  193.       Width           =   2595
  194.    End
  195.    Begin DataLib.ctData ctData1 
  196.       Height          =   315
  197.       Left            =   4620
  198.       TabIndex        =   7
  199.       Top             =   660
  200.       Width           =   975
  201.       _version        =   65536
  202.       _extentx        =   1720
  203.       _extenty        =   556
  204.       _stockprops     =   64
  205.    End
  206.    Begin SpinLib.ctSpin ctSpin2 
  207.       Height          =   285
  208.       Left            =   4680
  209.       TabIndex        =   6
  210.       Top             =   3300
  211.       Width           =   675
  212.       _version        =   65536
  213.       _extentx        =   1191
  214.       _extenty        =   503
  215.       _stockprops     =   64
  216.       repeatrate      =   4
  217.       spinstyle       =   1
  218.    End
  219.    Begin SpinLib.ctSpin ctSpin1 
  220.       Height          =   375
  221.       Left            =   7200
  222.       TabIndex        =   5
  223.       Top             =   3300
  224.       Width           =   195
  225.       _version        =   65536
  226.       _extentx        =   344
  227.       _extenty        =   661
  228.       _stockprops     =   64
  229.       bevelsize       =   1
  230.    End
  231.    Begin VB.Label Label3 
  232.       Caption         =   "ctDIAL : Dial Control"
  233.       BeginProperty Font 
  234.          name            =   "MS Sans Serif"
  235.          charset         =   0
  236.          weight          =   700
  237.          size            =   8.25
  238.          underline       =   0   'False
  239.          italic          =   0   'False
  240.          strikethrough   =   0   'False
  241.       EndProperty
  242.       Height          =   285
  243.       Left            =   300
  244.       TabIndex        =   3
  245.       Top             =   180
  246.       Width           =   1875
  247.    End
  248.    Begin VB.Label Lbl_Dial 
  249.       Alignment       =   2  'Center
  250.       BackColor       =   &H00FFFFFF&
  251.       BorderStyle     =   1  'Fixed Single
  252.       Caption         =   "0"
  253.       Height          =   285
  254.       Left            =   1920
  255.       TabIndex        =   2
  256.       Top             =   900
  257.       Width           =   495
  258.    End
  259.    Begin VB.Label Label1 
  260.       Caption         =   "Value :"
  261.       Height          =   285
  262.       Left            =   1200
  263.       TabIndex        =   1
  264.       Top             =   900
  265.       Width           =   615
  266.    End
  267.    Begin DialLib.ctDial ctDial1 
  268.       Height          =   735
  269.       Left            =   240
  270.       TabIndex        =   0
  271.       Top             =   630
  272.       Width           =   855
  273.       _version        =   65536
  274.       _extentx        =   1508
  275.       _extenty        =   1296
  276.       _stockprops     =   64
  277.    End
  278. Attribute VB_Name = "w_misc_demo"
  279. Attribute VB_Creatable = False
  280. Attribute VB_Exposed = False
  281. Dim nSpin As Integer
  282. Dim nArray As Integer
  283. Dim cString(12) As String
  284. Private Sub Command1_Click()
  285.   Unload w_misc_demo
  286. End Sub
  287. Private Sub ctData1_MouseCenter()
  288.    ctText1.Caption = "Last Page"
  289. End Sub
  290. Private Sub ctData1_MouseLeft()
  291.    ctText1.Caption = "Top of File"
  292. End Sub
  293. Private Sub ctData1_MouseRight()
  294.    ctText1.Caption = "Last Record"
  295. End Sub
  296. Private Sub ctData2_MouseCenter()
  297.    ctText1.Caption = "Next Page"
  298. End Sub
  299. Private Sub ctData2_MouseLeft()
  300.    ctText1.Caption = "Next Record"
  301. End Sub
  302. Private Sub ctData2_MouseRight()
  303.    ctText1.Caption = "End of File"
  304. End Sub
  305. Private Sub ctDial1_DialChange(nValue As Integer)
  306.    Lbl_Dial.Caption = Str(nValue)
  307. End Sub
  308. Private Sub ctSpin1_Click(nButton As Integer)
  309.    If nButton = 0 Then
  310.       nSpin = nSpin + 1
  311.     Else
  312.       nSpin = nSpin - 1
  313.    End If
  314.    Text1.Text = Str(nSpin)
  315. End Sub
  316. Private Sub ctSpin2_Click(nButton As Integer)
  317.    If (nButton = 1) Then
  318.       If (nArray < 12) Then
  319.          nArray = nArray + 1
  320.       End If
  321.    Else
  322.       If (nArray > 1) Then
  323.          nArray = nArray - 1
  324.       End If
  325.    End If
  326.    Text2.Text = cString(nArray)
  327. End Sub
  328. Private Sub Form_Load()
  329.    ' Center the window on the screen
  330.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.25
  331.    nSpin = 0
  332.    nArray = 1
  333.    cString(1) = "Stop Sign"
  334.    cString(2) = "Happy Face"
  335.    cString(3) = "Empty Diamond"
  336.    cString(4) = "Blue Diamond"
  337.    cString(5) = "Empty Box"
  338.    cString(6) = "Cross Box"
  339.    cString(7) = "Green Start"
  340.    cString(8) = "Previous Page"
  341.    cString(9) = "Last Record"
  342.    cString(10) = "Next Record"
  343.    cString(11) = "Next Page"
  344.    cString(12) = "Green End"
  345. End Sub
  346. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  347.     If (ctText1.Caption <> "") Then
  348.         ctText1.Caption = ""
  349.     End If
  350. End Sub
  351. Private Sub HScroll1_Change()
  352.    ctClip1.ActivePicture = HScroll1.Value
  353. End Sub
  354. Private Sub HScroll1_Scroll()
  355.    ctClip1.ActivePicture = HScroll1.Value
  356. End Sub
  357.